home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
PRG
/
PowerLisp 2.01 FAT Folder.sit
/
PowerLisp 2.01 FAT Folder
/
PowerLisp 2.01 ƒ
/
Library
/
defpackage.lisp
< prev
next >
Wrap
Lisp/Scheme
|
1996-05-17
|
1KB
|
41 lines
;;;
;;; PowerLisp 2.0
;;; Copyright ゥ 1996 Roger Corman. All rights reserved.
;;;
;
; File: defpackage.lisp
; Contents: defpackage implementation for PowerLisp.
;
(in-package :common-lisp)
(provide :defpackage)
(defmacro defpackage (name &rest options)
`(eval-when (:load-toplevel :compile-toplevel :execute)
(let ((package (find-package ',name)))
(if (null package)
(setq package (make-package ',name)))
(dolist (opt ',options)
(if (not (consp opt))
(error "Invalid defpackage option--should be a list: ~A~%"
opt))
(ecase (car opt)
(:size nil) ;; ignore this for now
(:nicknames (rename-package ',name ',name (cdr opt)))
(:shadow (shadow (cdr opt) ',name))
(:shadowing-import-from (shadowing-import (cdr opt) ',name))
(:use (use-package (cdr opt) ',name))
(:import-from (import (cdr opt) ',name))
(:intern (dolist (sym (cdr opt))
(intern sym ',name)))
(:export (export (cdr opt) ',name))))
package)))